package liecai_class.day08;

import java.io.IOException;
import java.io.InputStream;
import java.net.InetSocketAddress;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * BIO - 同步阻塞式IO
 * ACCEPT READ
 */
public class Demo08 {
    public static void main(String[] args) throws IOException {
        ServerSocket ss = new ServerSocket();
        ss.bind(new InetSocketAddress(9999));
        Socket socket = ss.accept();//产生了阻塞，等待客户端的连接

//        InputStream in = socket.getInputStream();
//        in.read();

        while(true){}
    }
}
